#include <iostream>

class Task
{
public:
    Task()
    {
        
    }
    Task(int x, char op, int y)
        : _x(x), _y(y), _op(op), _result(0), _code(0)
    {
    }

    void Run()
    {
        switch (_op)
        {
        case '+':
            _result = _x + _y;
            break;
        case '-':
            _result = _x - _y;
            break;
        case '*':
            _result = _x * _y;
            break;
        case '/':
            if (_y == 0)
                _code = 3;
            else
                _result = _x / _y;
            break;
        case '%':
            if (_y == 0)
                _code = 3;
            else
                _result = _x % _y;
            break;

        default:
            _code = 2;
            break;
        }
    }

    void PrintQues()
    {
        std::cout << _x << " " << _op << " " << _y << " = ? " << std::endl;
    }

    void PrintRest()
    {
        std::cout << "resulet: " << _result << "   code:  " << _code << std::endl;
    }

private:
    int _x;
    int _y;
    char _op;

    int _result;
    int _code;
};